package com.wyh.aop.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 王圆豪
 * Date: 2025-07-17
 * Time: 20:36
 */
@Aspect
//@Component
@Slf4j
@Order(3)
public class AspectDemo1 {
    @Pointcut("execution(* com.wyh.aop.controller.*.*(..))")
    private void pc(){}

    @Before("pc()")
    public void doBefore(){
        log.info("doBefore1......");
    }

    @After("pc()")
    public void doAfter(){
        log.info("doAfter1......");
    }
}
